package kr.hyunist.androidcomplete02saeildamil.ch30;

import kr.hyunist.androidcomplete02saeildamil.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class NewsControllerEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.newcontroltest);
	}

	public void mOnClick(View v) {
		Intent intent = null;
		switch (v.getId()) {
		case R.id.newscontrolstartbtn:
			intent = new Intent(this, NewsServiceEx.class);
			startService(intent);
			break;
			
		case R.id.newscontrolstopbtn:
			intent = new Intent(this, NewsServiceEx.class);
			stopService(intent);
			break;
		}
	}
}
